<template>
    <div class="logo">
        <nuxt-link to="/">
            <template>
                <img
                    src="~/assets/images/logo-mini.png"
                    :style="style"
                    alt="logo"
                />
            </template>

            <slot />
        </nuxt-link>
    </div>
</template>

<script>
export default {
    name: "logo",
    props: {
        type: {
            type: String,
            default: "text",
            validator(value) {
                return ["text", "icon", "image"].includes(value);
            },
        },
        height: {
            type: String,
            default: "",
        },
        width: {
            type: String,
            default: "",
        },
    },
    computed: {
        style() {
            return {
                width: this.width,
                height: this.height,
            };
        },
    },
};
</script>

